/*
 * @Author: lp
 * @Date: 2022-01-07 13:39:57
 * @LastEditTime: 2022-04-22 17:31:12
 * @LastEditors: Please set LastEditors
 * @Description: vue主入口文件
 * @FilePath: //nien-vue3-admin//src//main.ts
 */
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import VXETable from 'vxe-table'
import App from './App.vue'
import Router from './router'
import pinia from './store'
import 'normalize.css/normalize.css'
import 'element-plus/dist/index.css'
import { resetForm, validateForm, download } from '@/utils/index'
import Directive from '@/directive/index'
import '@/assets/style/index.less'
import i18n from '@/i18n'
import './rem'
// 加载svg
import 'virtual:svg-icons-register'
import 'xe-utils'
import 'vxe-table/lib/style.css'

const app = createApp(App)
// 挂载全局方法
app.config.globalProperties.$resetForm = resetForm
app.config.globalProperties.$validateForm = validateForm
app.config.globalProperties.$download = download

// 挂载pinia 状态管理
app.use(pinia)
// 挂载路由
.use(Router)
// 全局指令
.use(Directive)
// 国际化
.use(i18n)
// 全局安装elementPlus
.use(ElementPlus)
.use(VXETable)
.mount('#app')